package com.mxt.moviedemo.service;

import com.mxt.moviedemo.entity.PageRequest;
import com.mxt.moviedemo.entity.PageResult;
import com.mxt.moviedemo.entity.User;

import java.util.List;


public interface UserService {
    User loginForPhone(String phone, String password);
    User loginForEmail(String email,String password);
    User loginByUsernameAndPassword(String uname, String password, String role);
    int registerUser(User user);
    int getNextUid();


    User getUserByUsername(String uname);


    int updateUser(User user);
    int updateTicketUsername(String uname, String newName,User user);

    boolean recharge(String username, double amount);

    PageResult<User> getUsersByPage(PageRequest pageRequest);

    List<User> searchUsersByName(String uname);

    boolean deleteUserByUuid(int uuid);

    int getUserIdByUsername(String uname);
}

